<div class="right_side_operate_area">
	<div class="right_side_title left">
	</div>
    <div class="right item_add_btn">
    <?php 
    	$str_title=__("Add",true);
		echo $html->link(__("Cancel",true).$str_title,"/types/codetypes/");
    ?>
    </div>
    <div class="clear"></div>
</div>
<div class="right_side_scollbar">
    <div class="detail_info_panel">
		<?php echo $form->create('types',array('action'=>'addcodetypes','type'=>'post','onsubmit'=>'return checksave();'));?>
		<div class="details_item_line">
			<div class="details_item">
			    <div class="form_left_title left"><?php __("Type")?>：</div>
			    <div class="form_right_e_input left"><?php echo $form->text('Codetype.type',array('onkeypress'=>'TextValidate()','maxlength'=>'20'));?></div>
			    <div id='codetypetypemessage' style='display:none;' class="error_message">请输入类型</div>
			</div>
		</div>
		<div class="details_item_line">
			<div class="details_item">
			    <div class="form_left_title left">子<?php __("Type")?>：</div>
			    <div class="form_right_e_input left">
			    <?php echo $form->text('Codevalue.0.value',array('onkeypress'=>'TextValidate()','maxlength'=>'20'));?>
			    <?php echo $form->hidden('Codevalue.0.sort',array('value'=>'0'));?>
			    </div>
			</div>
		</div>
		<div class="details_item_line">
			<div class="details_item">
			    <div class="form_left_title left">子<?php __("Type")?>：</div>
			    <div class="form_right_e_input left">
			    <?php echo $form->text('Codevalue.1.value',array('onkeypress'=>'TextValidate()','maxlength'=>'20'));?>
			    <?php echo $form->hidden('Codevalue.1.sort',array('value'=>'1'));?>
			    </div>
			</div>
		</div>
		<div class="details_item_line">
			<div class="details_item">
			    <div class="form_left_title left">子<?php __("Type")?>：</div>
			    <div class="form_right_e_input left">
			    <?php echo $form->text('Codevalue.2.value',array('onkeypress'=>'TextValidate()','maxlength'=>'20'));?>
			    <?php echo $form->hidden('Codevalue.2.sort',array('value'=>'2'));?>
			    </div>
			</div>
		</div>
		<div class="details_item_line">
			<div class="details_item">
			    <div class="form_left_title left">子<?php __("Type")?>：</div>
			    <div class="form_right_e_input left">
			    <?php echo $form->text('Codevalue.3.value',array('onkeypress'=>'TextValidate()','maxlength'=>'20'));?>
			    <?php echo $form->hidden('Codevalue.3.sort',array('value'=>'3'));?>
			    </div>
			</div>
		</div>
		<div class="details_item_line">
			<div class="details_item">
			    <div class="form_left_title left">子<?php __("Type")?>：</div>
			    <div class="form_right_e_input left">
			    <?php echo $form->text('Codevalue.4.value',array('onkeypress'=>'TextValidate()','maxlength'=>'20'));?>
			    <?php echo $form->hidden('Codevalue.4.sort',array('value'=>'4'));?>
			    </div>
			</div>
		</div>
		<div class="details_item_line edit_form_btn">
            <div class="details_item">
            	<div class="form_left_title left"></div>
                <div class="form_add_submit left">
	                <?php echo $form->submit(__('Save',true), array("div"=>false)) ?>
	                <?php  echo $form->hidden('Codetype.id'); ?>
                </div>
            </div>
        </div>
		</form>
  </div>
</div>
<script>
function checksave()
{
	var type=$("#CodetypeType").val();
	if(type.trim() == ''){
		$("#codetypetypemessage").css('display','block');
		return false;
	}else{
		$("#codetypetypemessage").css('display','none');
	}
	return true;
}
</script>